﻿@model IEnumerable<KRM.Core.vWebDeliveringLoad>
@{
    ViewBag.Title = "Delivering Loads";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="~/js/load.js"></script>

<div class="container-fluid">
    <form action="/load/DeliveringLoads" method="GET">
        <div class="row-fluid" style="margin-top:20px">
            <div class="span1">Load ID</div>
            <div class="span2">
                <input type="text" class="input-block-level" name="loadid" />
            </div>
            <div class="span1">OrderRef</div>
            <div class="span2">
                <input type="text" class="input-block-level" name="orderref" />
            </div>
 
            <div class="span1">Carrier</div>
            <div class="span3">
                @Html.DropDownList("carrierID", null, new { @class = "input-block-level" })
            </div>
            <div class="span2">
                <input type="submit" class="btn btn-primary" value="Search" style="width: 100%" />
            </div>
        </div>
    </form>
        
    <table class="table table-bordered table-fix krmtable listloaddetailtable tbl-selected" data-height="500">
        <thead>
            <tr>
                <th></th>
                <th>LoadID</th>
                <th>LoadCode</th>
                <th>LoadStatus</th>
                 <th>DriverName</th>
                <th>CreatedDate</th>
                <th>Username</th>
                <th>PlannedDeliveryDate</th>
                <th>DespatchDate</th>
                <th>DeliveringDate</th>
                <th>CarrierName</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td><a class="btn btn-default" title="Track Location" onclick="PopupCenter('/load/deliverylocation?loadid=@item.LoadID',1200,650)"> <i class="icon-map-marker"></i></a></td>
                    <td>@item.LoadID</td>
                    <td>@item.LoadCode</td>
                    <td>@item.LoadStatus</td>
                    <td>@item.DriverName</td>
                    <td>@item.CreatedDate</td>
                    <td>@item.Username</td>
                    <td>@item.PlannedDeliveryDate</td>
                    <td>@item.DespatchDate</td>
                    <td>@item.StartDeliveringDate</td>
                    <td>@item.carrierName</td>
                </tr>
            }
        </tbody>
    </table>
</div>

